//Thu Apr  7 19:56:15 CDT 2011
#include <vector>
#include <list>
#include <map>
#include <set>
#include <deque>
#include <queue>
#include <stack>
#include <bitset>
#include <algorithm>
#include <functional>
#include <numeric>
#include <utility>
#include <sstream>
#include <iostream>
#include <iomanip>
#include <cstdio>
#include <cmath>
#include <cstdlib>
#include <cctype>
#include <string>
#include <cstring>
#include <cstdio>
#include <cmath>
#include <cstdlib>
#include <ctime>

using namespace std;

class TheLotteryBothDivs
{
public:

    double find(vector <string> goodSuffixes)
    {
        int N = goodSuffixes.size();
        double ret = 0.0;
        for (int i = 0; i < N; i++)
        {
            bool flag = true;
            for (int j = 0; j < i; j++) //reduce the duplicates;
                if (goodSuffixes[i] == goodSuffixes[j])
                    flag = false;
            for (int j = 0; j < N; j++) //reduce the substrings.
            {
                if (goodSuffixes[j].size() < goodSuffixes[i].size() && goodSuffixes[i].substr(goodSuffixes[i].size() - goodSuffixes[j].size()) == goodSuffixes[j])
                    flag = false;
            }
            if (flag)
            {
                ret += 1.0 / pow(10.0, 1.0 * goodSuffixes[i].size());
            }
        }
        return (int) (1000000000.0 * ret + 0.5) / 1000000000.0;
    }
};
